<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/27
 * Time: 14:28
 */
namespace app\api\model;

class Category extends BaseModel {
    protected $hidden = ['description','topic_img_id','delete_time','update_time'];

    /**
     * category表与img表的关联关系
     * @return \think\model\relation\BelongsTo
     */
    public function img(){
        return $this->belongsTo('image','topic_img_id','id');
    }

}